home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / progs / Netobj / CDK / NetObjectsFusionCDK5_97.exe / _SETUP.1 / ButtonObject.java < prev    next >
Encoding:
Java Source  |  1997-05-14  |  1.6 KB  |  103 lines

  1. import java.lang.Object;
  2.  
  3. /*
  4.  *
  5.  * ButtonObject
  6.  *
  7.  */
  8. public class ButtonObject extends Object
  9. {
  10.     private ButtonObject next;
  11.     private ButtonObject subButton;
  12.     private String text;
  13.     private String ID;
  14.     private String url;
  15.     private boolean subButtonsExist;
  16.  
  17.     public ButtonObject()
  18.     {
  19.         this.next = null;
  20.         
  21.         // the default is one sub-button
  22.  
  23.         this.subButton = new ButtonObject(true);
  24.         this.subButton.setNext(new ButtonObject(true));
  25.         this.text = "";
  26.         this.url = "";
  27.         this.ID = "0";
  28.         this.subButtonsExist = false;
  29.     }
  30.  
  31.     // a kludge to avoid infinite recursion
  32.  
  33.     public ButtonObject(boolean foo)
  34.     {
  35.         this.next = null;
  36.         this.subButton = null;
  37.         this.text = "";        
  38.         this.url = "";
  39.         this.ID = "0";
  40.     }
  41.  
  42.     final public void setText(String text)
  43.     {
  44.         this.text = text;
  45.     }
  46.  
  47.     final public void setID(String ID)
  48.     {
  49.         this.ID = ID;
  50.     }
  51.  
  52.     final public String getID()
  53.     {
  54.         return this.ID;
  55.     }
  56.  
  57.     final public String getText()
  58.     {
  59.         return this.text;
  60.     }
  61.  
  62.     final public ButtonObject getNext()
  63.     {
  64.         return this.next;
  65.     }
  66.  
  67.     final public void setNext(ButtonObject next)
  68.     {
  69.         this.next = next;
  70.     }
  71.  
  72.     final public void setURL(String url)
  73.     {
  74.         this.url = url;
  75.     }
  76.  
  77.     final public String getURL()
  78.     {
  79.         return this.url;
  80.     }
  81.  
  82.     final public void setSubButtons(ButtonObject subButton)
  83.     {
  84.         this.subButton = subButton;
  85.     }
  86.  
  87.     final public ButtonObject getSubButtons()
  88.     {
  89.         return this.subButton;
  90.     }
  91.  
  92.     final public boolean getSubButtonsExist()
  93.     {
  94.         return this.subButtonsExist;
  95.     }
  96.  
  97.     final public void setSubButtonsExist(boolean subButtonsExist)
  98.     {
  99.         this.subButtonsExist = subButtonsExist;
  100.     }
  101. }
  102.  
  103.